find_package(CUDA REQUIRED)

file(GLOB BASE_SRC 
    *.cpp
    *.cu
    ${CMAKE_CURRENT_SOURCE_DIR}/core/*.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/core/*.cu
)

file(GLOB BASE_HEADERS 
    *.h
    *.cuh
    ${CMAKE_CURRENT_SOURCE_DIR}/core/*.h
    ${CMAKE_CURRENT_SOURCE_DIR}/core/*.cuh
)

if(WIN32)
    cuda_add_library(base STATIC ${BASE_SRC} ${BASE_HEADERS})
    target_link_libraries(base external)
 else(WIN32)
    cuda_add_library(base STATIC ${BASE_SRC} ${BASE_HEADERS})
    target_link_libraries(base external)
endif(WIN32)